<!-- <snippet_RouteParameter> -->
@page "/RouteParameter"
@page "/RouteParameter/{text}"

<h1>Blazor is @Text!</h1>

@code {
    [Parameter]
    public string Text { get; set; }

    protected override void OnInitialized()
    {
        Text = Text ?? "fantastic";
    }
}
<!-- </snippet_RouteParameter> -->

<h2>RouteParameter.razor</h2>

<p>
    Request this page with a route parameter, and the 
    parameter is included in the heading. The Blazor 
    router uses route parameters to populate the 
    corresponding component parameters.
</p>

<pre><code>@@page "/RouteParameter"
@@page "/RouteParameter/{Text}"

&lt;h1&gt;Blazor is @@Text!&lt;/h1&gt;

@@code {
    [Parameter]
    public string Text { get; set; }

    protected override void OnInitialized()
    {
        Text = Text ?? "fantastic";
    }
}</code></pre>

<p>
    Example:
    <pre><code>/RouteParameter/amazing</code></pre>
    Renders HTML:
    <pre><code>&lt;h1&gt;Blazor is amazing!&lt;/h1&gt;</code></pre>
</p>
